home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / localtime < prev    next >
Text File  |  2001-07-14  |  1KB  |  40 lines

  1. SYNOPSIS
  2.         #include <time.h>
  3.  
  4.         int * localtime(int clock)
  5.         int * localtime(int* uclock)
  6.  
  7. DESCRIPTION
  8.         Interpret the argument clock as number of seconds since Jan,
  9.         1st, 1970, 0:00, and return the time in local time in a nice structure.
  10.         if <clock> is not specified, time() is used as default.
  11.  
  12.         Alternatively, accept an array of two ints: the first is <clock>
  13.         value as in the first form, the second int is the number of
  14.         microseconds elapsed in the current second, which is ignored.
  15.  
  16.         The result is an array of integers:
  17.  
  18.           int TM_SEC   (0) : Seconds (0..59)
  19.           int TM_MIN   (1) : Minutes (0..59)
  20.           int TM_HOUR  (2) : Hours (0..23)
  21.           int TM_MDAY  (3) : Day of the month (1..31)
  22.           int TM_MON   (4) : Month of the year (0..11)
  23.           int TM_YEAR  (5) : Year (e.g.  2001)
  24.           int TM_WDAY  (6) : Day of the week (Sunday = 0)
  25.           int TM_YDAY  (7) : Day of the year (0..365)
  26.           int TM_ISDST (8) : TRUE: Daylight saving time
  27.  
  28. EXAMPLES
  29.  
  30.         printf("Today is %s\n"
  31.               , ({ "Sunday", "Monday", "Tuesday", "Wednesday"
  32.                  , "Thursday", "Friday", "Saturday"
  33.                 })[localtime()[TM_WDAY]]);
  34.  
  35. HISTORY
  36.         Introduced in LDMud 3.2.9
  37.  
  38. SEE ALSO
  39.         ctime(E), gmtime(E), time(E), utime(E)
  40.